% !TEX TS-program = lualatex
% !TEX encoding = UTF-8

% This is a simple template for a LuaLaTeX document using gregorio scores.

\documentclass[letterpaper,12pt]{article} % use larger type; default would be 10pt

\newcommand{\headingtext}{9th Sunday after Pentecost.}

\newcommand{\latincollect}{Páteant aures misericórdiæ tuæ Dómine précibus supplicántium~:~\gredagger{} et ut peténtibus desideráta concédas,~* fac eos quæ tibi sunt plácita postuláre. Per Dóminum nostrum.}
\newcommand{\englishcollect}{Let Thy merciful ears, O Lord, be open to the prayers of Thy suppliants: and that Thou mayest grant their desire to those that seek; make them ask such things as please Thee. Through our Lord.}

\newcommand{\englishmagantiphon}{It is written: My house is the house of prayer; but you have made it a den of thieves.  And He was teching daily in the temple.}

\newcommand{\magantlinetwo}{Ant. 8. G}
\newcommand{\magtex}{MagnificatSimple8G}
\newcommand{\magmedianttermination}{\medianttermination{Mediant of 1 accent.}{Termination of 1 accent with 2 preperatory syllables.}}

\newcommand{\magverses}{\greblockcustos\setgrefactor{16}
\begin{magnificat}{\magtex}
\item \vspace{-1ex} Quia respéxit humilitátem ancíllae \textbf{sú}æ~:~* ecce enim ex hoc beátam me dícent ómnes gene\emph{ra}\emph{ti}\textbf{ó}nes.
\item Quia fécit míhi mágna qui \textbf{pó}tens est~:~* et sánctum \emph{nó}\emph{men} \textbf{é}jus.
\item Et misericórdia éjus a progénie in pro\textbf{gé}nies~* timén\emph{ti}\emph{bus} \textbf{é}um.
\item Fécit poténtiam in bráchio \textbf{sú}o~:~* dispérsit supérbos ménte \emph{cór}\emph{dis} \textbf{sú}i.
\item Depósuit poténtes de \textbf{sé}de,~* et exal\emph{tá}\emph{vit} \textbf{hú}miles.
\item Esuriéntes implévit \textbf{bó}nis~:~* et dívites dimí\emph{sit} \emph{in}\textbf{á}nes.
\item Suscépit Israel púerum \textbf{sú}um,~* recordátus misericór\emph{di}\emph{æ} \textbf{sú}æ.
\item Sicut locútus est ad pátres \textbf{nó}stros,~* Abraham et sémini é\emph{jus} \emph{in} \textbf{saé}cula.
\item Glória Pátri, et \textbf{Fí}lio,~* et Spirí\emph{tu}\emph{i} \textbf{Sán}cto.
\item Sicut érat in princípio, et núnc, et \textbf{sém}per,~* et in saécula sæcu\emph{ló}\emph{rum}. \textbf{A}men.
\end{magnificat}
}

\newcommand{\maganttex}{MagnificatAntiphonPentecost9.tex}

% usual packages loading:
%\usepackage{luatextra}
%\usepackage{graphicx} % support the \includegraphics command and options
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % or letterpaper (US) or a5paper or....
\usepackage{gregoriotex} % for gregorio score inclusion

% If you use usual TeX fonts, here is a starting point:
%\usepackage{palatino}
%\input{glyphtounicode} \pdfglyphtounicode{f_f}{FB00} \pdfglyphtounicode{f_f_i}{FB03} \pdfglyphtounicode{f_f_l}{FB04}
%\pdfglyphtounicode{Q_u}{E048} \pdfglyphtounicode{O_e}{0152} \pdfglyphtounicode{o_e}{0153}
%\pdfgentounicode=1
% to change the font to something better, you can install the kpfonts package (if not already installed). To do so
% go open the "TeX Live Manager" in the Menu Start->All Programs->TeX Live 2010
%\def\greinitialformat#1{{\fontsize{37}{37}\selectfont #1}}
%small > footnotesize > scriptsize > tiny
\input{../gsp-spaces}


% my stuff
\usepackage[garamond]{../mypackage}
%\usepackage[solemn,tone=3a]{magnificat}
% end my stuff

\setgrefactor{17}

\marginsize{30pt}{30pt}{30pt}{30pt}
\pagestyle{fancy} % no header or footers
%\renewcommand\headrulewidth{0pt}

% here we begin the document
\begin{document}
\chead{\headingtext}
%\cfoot{\thepage}
%\begin{center}\vspace*{-5ex}{\large\textbf Chapter.}\end{center}
% default width is 265pt
% ,colwidths={1=253pt}
%\begin{parcolumns}[rulebetween]{2}
%\colchunk{\sloppy\dropcap{latin}{Caríssimi~: Nolíte mirári, si odit vos} \textbf{mun}\-dus.~\gredagger{} Nos scimus quóniam transláti sumus de mor\-\emph{te} \emph{ad} \textbf{vi}\-tam~:~* quóniam dilígimus \textbf{fra}\-tres.}
%\colchunk{\sloppy \dropcap{american}{Dearly beloved, Wonder not if the world hate you.  We know that we have passed from death to life, because we love the brethren.}}
%\end{parcolumns}
%\medskip

%\emph{Hymn.} Lúcis Creátor óptime. \Vbar{}. Dirigátur Dómine.
%\smallskip
%\hrule
%\smallskip

\setspaceafterinitial{4.5mm plus 0em minus 0em}
\setspacebeforeinitial{4.5mm plus 0em minus 0em}

% Here we set the initial font. Change 43 if you want a bigger initial.
\def\greinitialformat#1{%
{\fontsize{35}{35}\selectfont #1}%
}

%\smallskip
%\hrule
%\smallskip
%\pagebreak
\selectlanguage{latin}
% The title:
\begin{center}{\large Magnificat.}\end{center}
\vspace{-1ex}
% Here we set the space around the initial.
% Please report to http://home.gna.org/gregorio/gregoriotex/details for more details and options

% We set red lines here, comment it if you want black ones.
%\redlines

% We set VII above the initial.
{\gresetfirstlineaboveinitial{\small At Magn.}{\small At Magn.}
\setsecondannotation{\small \oldstylenums{\magantlinetwo}}

% We type a text in the top right corner of the score:
%\commentary{{\small \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}}

% and finally we include the score. The file must be in the same directory as this one.
%\normalsize
%\fontsize{12.35}{12.35}\selectfont
\large
\includescore{\maganttex}}%
%\bigskip
%\vspace{-4ex}
\translation[]{\englishmagantiphon}
\smallskip
\hrule
\magmedianttermination

\normalsize

{\magverses}

\smallskip
{\noindent\emph{Repeat antiphon.}\\}

\hrule
\smallskip
\begin{center}{\large Collect.}\end{center}
% default width is 265pt
%\sloppy
%,colwidths={1=220pt}
\begin{parcolumns}[rulebetween]{2}
\sloppy
\prayer{\latincollect}{\englishcollect}
\end{parcolumns}

\end{document}
